﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
//huba

namespace TrafficSimulation
{
    public class Cell
    {
        private Position cellPosition;//topleft position of the cell
        private bool isFree;
        private int itemId;     //to change to enum
        private ItemTypes itemType;//to change to enum
        private int neighbourTopId, neighbourBottomId, neighbourRightId, neighbourLeftId;
        private string backColor, borderColor;
        private string neighbourTypeTop, neighbourTypeBottom, neighbourTypeRight, neighbourTypeLeft;
        private Graphics grid;

#region Properties
        public string BackColor { get; set; }//grey and white
        public string BorderColor { get; set; }

        public Port Port
        {
            get
            {
                throw new System.NotImplementedException();
            }
            set
            {
            }
        }//green and red

        public ItemTypes ItemType
        {
            get { return itemType; }
            set { itemType = value; }
        }
#endregion

        #region Functions
        public void drawItem()
        { }
        public void paintCellBorder(Color c)
        { }
        public void paintCellBackground()
        { }
        public void setNeighbourTop(int Id, string type)//to be called from the event
        { }
        public void setNeighbourBottom(int Id, string type)//to be called from the event
        { }
        public void setNeighbourLeft(int Id, string type)//to be called from the event
        { }
        public void setNeighbourRight(int Id, string type)//to be called from the event
        { }
        public void setNeighbourTop(bool deleted)//to be called from the event
        { }
        public void setNeighbourBottom(bool deleted)//to be called from the event
        { }
        public void setNeighbourLeft(bool deleted)//to be called from the event
        { }
        public void setNeighbourRight(bool deleted)//to be called from the event
        { }

        public bool isTypePossible(ItemTypes items)
        { return true; }
        public bool isCellEmpty()//checks if a cell is empty
        { return true; }
        public Object getItem()//returns the item in a cell
        { return null; }
        /// <summary>
        /// checks if the specified position belongs to a port
        /// </summary>
        /// <param name="pos"></param>
        /// <returns></returns>
        public bool checkPosBelongToPort(Position pos)
        { return true; }
        public Port getPort(Position pos)
        { return null; }
#endregion
#region Events
        public delegate void newItemPLacedHandler(object sender);
        public event newItemPLacedHandler newItemPLaced;
#endregion
    }
}
